Your application can define node-entering and node-leaving procedures that are called each time a node is entered or left.
You can define a routine to respond to a node's being entered.
pascal OSErr MyEnteringNodeProc (
QTVRInstance qtvr,
UInt32 nodeID,
SInt32 refCon);
Your MyEnteringNodeProc procedure is called whenever a node is entered, either in response to user actions or in response to QuickTime VR Manager functions that change nodes (such as QTVRGoToNodeID ). Your procedure can do any processing it deems necessary.
Use QTVRSetEnteringNodeProc to install a node-entering procedure. See Listing 2-8 for a sample node-entering procedure.
You can define a routine to respond to a node's being left.
pascal OSErr MyLeavingNodeProc (
QTVRInstance qtvr,
UInt32 fromNodeID,
UInt32 toNodeID,
Boolean *cancel,
SInt32 refCon);
Your MyLeavingNodeProc procedure is called whenever a node is left, either in response to user actions or in response to QuickTime VR Manager functions that change nodes (such as QTVRGoToNodeID ). Your procedure can do any processing it deems necessary.
Before returning, your procedure should set the Boolean value pointed to by the cancel parameter to false to accept the move from fromNodeID to toNodeID . Set that value to true to cancel the move and to remain at the node specified by the fromNodeID parameter.
Use QTVRSetLeavingNodeProc to install a node-leaving procedure. See Listing 2-9 for a sample node-leaving procedure.
| Previous | Chapter Contents | Chapter Top | Next |